package com.mlming.springboot.dao;

import com.mlming.springboot.pojo.User;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    /**
     * 判断是否存在该用户名
     */
    int countByUsername(String username);
    /**
     * 判断是否存在该邮箱
     */
    int countByEmail(String email);

    /**
     * 根据用户名查询是否有该用户
     */
    User selectByUserName(String username);
}